#include "Common.hpp"

int main()
{
    info.GetKey();
    info.Getshmid();
    info.Attchshm();
    int fd = open("/fifo", O_WRONLY);
    int num = 5;
    struct shinfo *share = (struct shinfo *)info.Addr();
    while (num--)
    {
        write(fd,"1",sizeof("1"));
        strcpy(share->time, GetCurrTime().c_str());
        strcpy(share->status, "最新");
        // share->status="最新";
        sleep(3);
    }
    close(fd)
    info.Deattch();
    return 0;
}